﻿@model IEnumerable<Project.Domain.Entities.League>
@{
    ViewBag.Title = "listallleague";
}
<h2>listallleague</h2>

<table>
    <tr>
        <th>
            Tên giải đấu
        </th>
        <th>
            Ngày tạo
        </th>
        <th>
            Hôm nay
        </th>
        <th>
            Thao tác
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @item.NameLeague
            </td>
            <td>
                @string.Format("{0:dd/MM/yyyy}",item.CreatedTime)
            </td>
            <td>
                @(item.IsPlay ? Html.Raw("Có trận đấu") : Html.Raw("Không có"))
            </td>
            <td>
                @Html.ActionLink("edit","editleague",new {controller="managebets",id=item.LeagueId})
            </td>
        </tr>
    }
    
</table>
@Html.ActionLink("addnew", "insertleague", "Managebets")
